package cn.iocoder.yudao.module.trade.controller.admin.fruitcard.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.*;

import java.time.LocalDateTime;

import org.springframework.format.annotation.DateTimeFormat;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 水果卡 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class FruitCardDetailBaseVO {

    @Schema(description = "水果卡id", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "水果卡id不能为空")
    private Long fruitCardId;

    @Schema(description = "卡号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "卡号不能为空")
    private String cardNo;

    @Schema(description = "卡密", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "卡密不能为空")
    private String cardPwd;

    @Schema(description = "激活时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "激活时间不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime activationTime;

    @Schema(description = "过期时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "过期时间不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime expiredTime;

    @Schema(description = "使用次数", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "使用次数不能为空")
    private Integer uses;

    @Schema(description = "状态 0--生成 1--已激活", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "状态 0--生成 1--已激活不能为空")
    private Boolean status;

}
